SCSetTestImagePixMap
TheSCSetTestImagePixMap
function sets the dialog box's test image from a picture that is stored in a pixel map.
pascal ComponentResult SCSetTestImagePixMap (ComponentInstance ci, PixMapHandle testPixMap, Rect *testRect, short testFlags);
ci
- Identifies your application's connection to a standard image-compression dialog component.
testPixMap
- Contains a handle to a pixel map that contains the new test image. Your application is responsible for creating this pixel map before calling this function. You must also dispose of the pixel map when you are done with it. You must clear the image or close your connection to the standard image-compression dialog component before you dispose of the pixel map.
- Set this parameter to
nil
to clear the test image.testRect
- Contains a pointer to a rectangle structure. This rectangle specifies, in the coordinate system of the source image, the area of interest or point of interest in the test image. The area of interest defines a portion of the test image that is to be shown to the user in the dialog box. Use this parameter to direct the component to a specific portion of the test image. The component uses the value of the
testFlags
parameter to determine how it transforms large images before displaying them to the user.- You may specify a point of interest by setting the points in the rectangle structure so that they enclose a single point--for example, (0,0) and (1,1). The component centers this point in the image that is displayed in the dialog box, and displays the part of the image that fits in the test image portion of the dialog box.
- To use the entire pixel map, specify
nil
in this parameter.testFlags
- Specifies how the component is to display a test image that is larger
than the test image portion of the dialog box. If you set this parameter
to 0, the component uses a default method of its own choosing. In all cases, the component centers the area or point of interest in the test image portion of the dialog box, and then displays some part of the test image.- You may indicate your display preference by setting this parameter to one of the following values:
scPreferCropping
Indicates that the component should crop the test image to fit the test image portion of the dialog box. The component displays the part of the image that fits in the test image portion of the box. If the image is smaller than the space alloted in the dialog box, the component does not alter the image before displaying it--the resulting image is smaller than the available space.scPreferScaling
Indicates that the component should scale the test image
to fit the test image portion of the dialog box. The component shrinks the image to fit the test image portion of the dialog box.scPreferScalingAndCropping
Indicates that the component should both scale and crop the test image. This option is useful with very large test images. The component first shrinks the image to approximately the size of the test image portion of
the dialog box, then trims the image so that it fits the available space.RESULT CODE
paramErr -50 Invalid parameter specified
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help